import 'package:flutter/material.dart';

Future<T?> pushPage<T extends Object>(BuildContext context, Widget widget) {
  return Navigator.of(context).push<T>(MaterialPageRoute(builder: (BuildContext context) => widget));
}

Future<T?> pushNameAndArguments<T extends Object>(BuildContext context, String name, Object arguments) {
  return Navigator.of(context).pushNamed(name, arguments: arguments);
}

Future<T?> pushName<T extends Object>(BuildContext context, String name) {
  return Navigator.of(context).pushNamed(name);
}
